@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-default">
                    <div class="panel-heading">Dashboard <a href="/upload" class="btn-danger">上传视频</a></div>

                    <div class="panel-body">
                        @foreach($videos as $video)
                            <div>
                                <img src="{{ $video->video_face }}" alt="" data-videoId="{{ $video->video_id }}" onclick="videoJump({{ $video->video_id }})">
                            </div>
                        @endforeach
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        function videoJump(video_id) {
            window.location.href = '/player?videoId='+video_id;
        }
    </script>
@endsection
